package com.business.web.spring;

import java.io.File;
import java.util.Date;
import java.util.List;

import com.auth.domain.T_user;
import com.auth.service.T_userService;
import com.business.domain.T_building;
import com.business.domain.T_task_instance;
import com.business.service.T_task_instanceService;
import com.common.utils.DateUtil;
import org.apache.log4j.Logger;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.business.domain.T_task_node_instance;
import com.easyworkflow.web.spring.WorkFlowController;

//import com.workflow.WorkFlowUtils;
import com.common.db.JsonVO;
import com.common.db.Pg;
import com.common.utils.BeanUtils;
import com.business.domain.T_news;
//import com.business.mapper.T_newsMapper;
import com.business.service.T_newsService;
import org.springframework.web.multipart.MultipartFile;

@Controller
@RequestMapping("/t_news")

public class T_newsController extends WorkFlowController{

	private static Logger log = Logger.getLogger(T_newsController.class.getName());

	@Resource
    private T_newsService t_newsService;
	@Resource
	private T_task_instanceService t_task_instanceService;
	@Resource
	private T_userService t_userService;

	//@Autowired
	//private WorkFlowUtils workFlowUtils;

	//@Resource
	//private T_newsMapper mapper;
	//private int id;
	//private int[] ids;
	private Pg pg;

	/**
	 * 按照月份查询统计请假时间；
	 * @param request
	 * @return
	 */
	@RequestMapping("/getHolidayCount")
	@ResponseBody
	public Pg getHolidayCount(HttpServletRequest request){
		int pageSize = 10;
		int startIndex = 0;
		T_news t_news = new T_news();
		try{
			if(request.getParameter("pageSize")!=null){
				pageSize = BeanUtils.stringToInt("pageSizeFlag", request.getParameter("pageSize"));
			}
			if(request.getParameter("startIndex")!=null){
				startIndex = BeanUtils.stringToInt("startIndexFlag", request.getParameter("startIndex"));
			}
			if(request.getParameter("process_code")!=null){ //取得动作流 流程英文名称，后台查询数据关联使用
				t_news.setProcess_code(request.getParameter("process_code"));
			}
			if(request.getParameter("creater")!=null&&!"".equals(request.getParameter("creater"))){
				t_news.setCreater(request.getParameter("creater"));
			}
			if(request.getParameter("creattime")!=null&&!"".equals(request.getParameter("creattime"))){
				t_news.setCreattime(request.getParameter("creattime"));
			}
			if(request.getParameter("newfrom")!=null&&!"".equals(request.getParameter("newfrom"))){
				t_news.setNewfrom(request.getParameter("newfrom"));
			}
			if(request.getParameter("ext7")!=null&&!"".equals(request.getParameter("ext7"))){
				t_news.setExt7(request.getParameter("ext7"));
			}
			if(request.getParameter("ext1")!=null&&!"".equals(request.getParameter("ext1"))){
				t_news.setExt1(request.getParameter("ext1"));
			}
			if(request.getParameter("newdate")!=null&&!"".equals(request.getParameter("newdate"))){
				t_news.setNewdate(request.getParameter("newdate"));
			}
			if(request.getParameter("startdate")!=null&&!"".equals(request.getParameter("startdate"))){
				t_news.setStartdate(request.getParameter("startdate"));
			}
			if(request.getParameter("enddate")!=null&&!"".equals(request.getParameter("enddate"))){
				t_news.setEnddate(request.getParameter("enddate"));
			}
			if(request.getParameter("process_status")!=null&&!"".equals(request.getParameter("process_status"))){
				t_news.setProcess_status(request.getParameter("process_status"));
			}

			t_news.setStartNo( startIndex );
			t_news.setPageSize( pageSize );
			t_news.setEndNo( pageSize );
			List<T_news> findAll = t_newsService.findHolidayCount(t_news);
			int totalCount = 100 ; // t_newsService.findCountAll(t_news);
			pg = new Pg(findAll, totalCount, pageSize, startIndex);
			request.setAttribute("t_newsList", findAll);
			request.setAttribute("pg", pg);
		} catch (Exception e) {
			e.printStackTrace();
			log.error("------query t_newsList error:"+e);
		}

		return pg;
	}

	/**
	 * 1、获取 T_news信息列表，并且在列表页面展示
	 * @param request
	 * @return Pg，json格式
	 */
	@RequestMapping("/getAllT_news")
	@ResponseBody
	public Pg getAllT_news(HttpServletRequest request){
        int pageSize = 10;
        int startIndex = 0;
        T_news t_news = new T_news();
        try{
	        if(request.getParameter("pageSize")!=null){
	        	pageSize = BeanUtils.stringToInt("pageSizeFlag", request.getParameter("pageSize"));
	        }
	        if(request.getParameter("startIndex")!=null){
	            startIndex = BeanUtils.stringToInt("startIndexFlag", request.getParameter("startIndex"));
	        }
	        if(request.getParameter("process_code")!=null){ //取得动作流 流程英文名称，后台查询数据关联使用
	        	t_news.setProcess_code(request.getParameter("process_code"));
	        }
			if(request.getParameter("types")!=null&&!"".equals(request.getParameter("types"))){
	        	t_news.setTypes(request.getParameter("types"));
	        }
			if(request.getParameter("title")!=null&&!"".equals(request.getParameter("title"))){
	        	t_news.setTitle(request.getParameter("title"));
	        }
			if(request.getParameter("creater")!=null&&!"".equals(request.getParameter("creater"))){
	        	t_news.setCreater(request.getParameter("creater"));
	        }
			if(request.getParameter("updater")!=null&&!"".equals(request.getParameter("updater"))){
	        	t_news.setUpdater(request.getParameter("updater"));
	        }
			if(request.getParameter("publisher")!=null&&!"".equals(request.getParameter("publisher"))){
	        	t_news.setPublisher(request.getParameter("publisher"));
	        }
			if(request.getParameter("creattime")!=null&&!"".equals(request.getParameter("creattime"))){
	        	t_news.setCreattime(request.getParameter("creattime"));
	        }
			if(request.getParameter("updattime")!=null&&!"".equals(request.getParameter("updattime"))){
	        	t_news.setUpdattime(request.getParameter("updattime"));
	        }
			if(request.getParameter("publishtime")!=null&&!"".equals(request.getParameter("publishtime"))){
	        	t_news.setPublishtime(request.getParameter("publishtime"));
	        }
			if(request.getParameter("checker")!=null&&!"".equals(request.getParameter("checker"))){
	        	t_news.setChecker(request.getParameter("checker"));
	        }
			if(request.getParameter("checktime")!=null&&!"".equals(request.getParameter("checktime"))){
	        	t_news.setChecktime(request.getParameter("checktime"));
	        }
			if(request.getParameter("hticount")!=null&&!"".equals(request.getParameter("hticount"))){
	        	t_news.setHticount(request.getParameter("hticount"));
	        }
			if(request.getParameter("newfrom")!=null&&!"".equals(request.getParameter("newfrom"))){
	        	t_news.setNewfrom(request.getParameter("newfrom"));
	        }
			if(request.getParameter("color")!=null&&!"".equals(request.getParameter("color"))){
	        	t_news.setColor(request.getParameter("color"));
	        }
			if(request.getParameter("size")!=null&&!"".equals(request.getParameter("size"))){
	        	t_news.setSize(request.getParameter("size"));
	        }
			if(request.getParameter("zg")!=null&&!"".equals(request.getParameter("zg"))){
	        	t_news.setZg(request.getParameter("zg"));
	        }
			if(request.getParameter("cq")!=null&&!"".equals(request.getParameter("cq"))){
	        	t_news.setCq(request.getParameter("cq"));
	        }
			if(request.getParameter("content")!=null&&!"".equals(request.getParameter("content"))){
	        	t_news.setContent(request.getParameter("content"));
	        }
			if(request.getParameter("memo")!=null&&!"".equals(request.getParameter("memo"))){
	        	t_news.setMemo(request.getParameter("memo"));
	        }
			if(request.getParameter("ext1")!=null&&!"".equals(request.getParameter("ext1"))){
	        	t_news.setExt1(request.getParameter("ext1"));
	        }
			if(request.getParameter("ext2")!=null&&!"".equals(request.getParameter("ext2"))){
	        	t_news.setExt2(request.getParameter("ext2"));
	        }
			if(request.getParameter("ext3")!=null&&!"".equals(request.getParameter("ext3"))){
	        	t_news.setExt3(request.getParameter("ext3"));
	        }
			if(request.getParameter("ext4")!=null&&!"".equals(request.getParameter("ext4"))){
	        	t_news.setExt4(request.getParameter("ext4"));
	        }
			if(request.getParameter("ext5")!=null&&!"".equals(request.getParameter("ext5"))){
	        	t_news.setExt5(request.getParameter("ext5"));
	        }
			if(request.getParameter("ext6")!=null&&!"".equals(request.getParameter("ext6"))){
	        	t_news.setExt6(request.getParameter("ext6"));
	        }
			if(request.getParameter("ext7")!=null&&!"".equals(request.getParameter("ext7"))){
	        	t_news.setExt7(request.getParameter("ext7"));
	        }
			if(request.getParameter("ext8")!=null&&!"".equals(request.getParameter("ext8"))){
	        	t_news.setExt8(request.getParameter("ext8"));
	        }
			if(request.getParameter("ext9")!=null&&!"".equals(request.getParameter("ext9"))){
	        	t_news.setExt9(request.getParameter("ext9"));
	        }
			if(request.getParameter("status")!=null&&!"".equals(request.getParameter("status"))){
	        	t_news.setStatus(request.getParameter("status"));
	        }
			if(request.getParameter("check2")!=null&&!"".equals(request.getParameter("check2"))){
	        	t_news.setCheck2(request.getParameter("check2"));
	        }
			if(request.getParameter("classes")!=null&&!"".equals(request.getParameter("classes"))){
	        	t_news.setClasses(request.getParameter("classes"));
	        }
			if(request.getParameter("checkstatus")!=null&&!"".equals(request.getParameter("checkstatus"))){
	        	t_news.setCheckstatus(request.getParameter("checkstatus"));
	        }
			if(request.getParameter("link")!=null&&!"".equals(request.getParameter("link"))){
	        	t_news.setLink(request.getParameter("link"));
	        }
			if(request.getParameter("newdate")!=null&&!"".equals(request.getParameter("newdate"))){
	        	t_news.setNewdate(request.getParameter("newdate"));
	        }
			if(request.getParameter("descriptions")!=null&&!"".equals(request.getParameter("descriptions"))){
	        	t_news.setDescriptions(request.getParameter("descriptions"));
	        }
			if(request.getParameter("level1")!=null&&!"".equals(request.getParameter("level1"))){
	        	t_news.setLevel1(request.getParameter("level1"));
	        }
			if(request.getParameter("level2")!=null&&!"".equals(request.getParameter("level2"))){
	        	t_news.setLevel2(request.getParameter("level2"));
	        }
			if(request.getParameter("level3")!=null&&!"".equals(request.getParameter("level3"))){
	        	t_news.setLevel3(request.getParameter("level3"));
	        }
			if(request.getParameter("level1name")!=null&&!"".equals(request.getParameter("level1name"))){
	        	t_news.setLevel1name(request.getParameter("level1name"));
	        }
			if(request.getParameter("level2name")!=null&&!"".equals(request.getParameter("level2name"))){
	        	t_news.setLevel2name(request.getParameter("level2name"));
	        }
			if(request.getParameter("level3name")!=null&&!"".equals(request.getParameter("level3name"))){
	        	t_news.setLevel3name(request.getParameter("level3name"));
	        }
			if(request.getParameter("imagepath")!=null&&!"".equals(request.getParameter("imagepath"))){
	        	t_news.setImagepath(request.getParameter("imagepath"));
	        }
			if(request.getParameter("ranger")!=null&&!"".equals(request.getParameter("ranger"))){
	        	t_news.setRanger(request.getParameter("ranger"));
	        }
			if(request.getParameter("biztype")!=null&&!"".equals(request.getParameter("biztype"))){
	        	t_news.setBiztype(request.getParameter("biztype"));
	        }
      	    if(request.getParameter("id")!=null&&!"".equals(request.getParameter("id"))){
	        	t_news.setId(new Integer(request.getParameter("id")));
	        }

	        if(request.getParameter("startdate")!=null&&!"".equals(request.getParameter("startdate"))){
	        	t_news.setStartdate(request.getParameter("startdate"));
	        }
	        if(request.getParameter("enddate")!=null&&!"".equals(request.getParameter("enddate"))){
	        	t_news.setEnddate(request.getParameter("enddate"));
	        }
			if(request.getParameter("process_status")!=null&&!"".equals(request.getParameter("process_status"))){
				t_news.setProcess_status(request.getParameter("process_status"));
			}

	        t_news.setStartNo( startIndex );
	        t_news.setPageSize( pageSize );
	        t_news.setEndNo( pageSize );
	    	List<T_news> findAll = t_newsService.findAll(t_news);
	        int totalCount = t_newsService.findCountAll(t_news);
	       	pg = new Pg(findAll, totalCount, pageSize, startIndex);
	       	request.setAttribute("t_newsList", findAll);
		    request.setAttribute("pg", pg);
	    } catch (Exception e) {
			e.printStackTrace();
			log.error("------query t_newsList error:"+e);
		}

		return pg;
	}

	/**
	 * 2、1、新增保存  T_news信息并且返回成功或者失败信息json格式结果如：result:[success/error]
	 * @param t_news
	 * @param request
	 * @return
	 */
	@RequestMapping("/saveT_news")
	@ResponseBody
	public JsonVO saveT_news(T_news t_news, HttpServletRequest request,HttpServletResponse response){
		JsonVO vo = new JsonVO();
		vo.setResult("error");
		vo.setJieguo(false);
		//如果有特殊需求，需要将json对象值转成java实体对象属性值
		String biztype = t_news.getBiztype();

		//如果是申请类型的，需要加工一个固定格式的编号；
		// TAJG-HT-2021-0001、TAJG-YY-2021-0001、TAJG-FW-2021-0001、
		// TAJG-BX-2021-0001 、TAJG-WPLY-2021-0001、TAJG-YC-2021-0001、
		// TAJG-QJ-2021-0001、TAJG-WC-2021-0001 、TAJG-CC-2021-0001、
		// TAJG-BK-2021-0001、TAJG-JB-2021-0001、TAJG-KD-2021-0001
		if("MyApply".equals(biztype)){
			String apptypes = t_news.getTypes();
			int cuurBh = 0;
			String bh ="";
			cuurBh = t_newsService.findTypesCount(t_news).getExtint1() +1;
			if("ContractApply".equals(apptypes)){
				bh = "TAJG-HT-"+ DateUtil.getCurrYear() +"-"+ cuurBh;
			}else if("MoneyApply".equals(apptypes)){
				bh = "TAJG-QK-"+ DateUtil.getCurrYear() +"-"+ cuurBh;
			}else if("PayApply".equals(apptypes)){
				bh = "TAJG-FK-"+ DateUtil.getCurrYear() +"-"+ cuurBh;
			}else if("YongyinApply".equals(apptypes)){
				bh = "TAJG-YY-"+ DateUtil.getCurrYear() +"-"+ cuurBh;
			}else if("FawenApply".equals(apptypes)){
				bh = "TAJG-FW-"+ DateUtil.getCurrYear() +"-"+ cuurBh;
			}else if("ReceiveApply".equals(apptypes)){
				bh = "TAJG-BX-"+ DateUtil.getCurrYear() +"-"+ cuurBh;
			}else if("GetApply".equals(apptypes)){
				bh = "TAJG-WPLY-"+ DateUtil.getCurrYear() +"-"+ cuurBh;
			}else if("CarApply".equals(apptypes)){
				bh = "TAJG-YC-"+ DateUtil.getCurrYear() +"-"+ cuurBh;
			}else if("HolidyApply".equals(apptypes)){
				bh = "TAJG-QJ-"+ DateUtil.getCurrYear() +"-"+ cuurBh;
			}else if("OutApply".equals(apptypes)){
				bh = "TAJG-WC-"+ DateUtil.getCurrYear() +"-"+ cuurBh;
			}else if("TrivalApply".equals(apptypes)){
				bh = "TAJG-CC-"+ DateUtil.getCurrYear() +"-"+ cuurBh;
			}else if("AddjobApply".equals(apptypes)){
				bh = "TAJG-JB-"+ DateUtil.getCurrYear() +"-"+ cuurBh;
			}else if("AddcardApply".equals(apptypes)){
				bh = "TAJG-BK-"+ DateUtil.getCurrYear() +"-"+ cuurBh;
			}else if("KuaidiApply".equals(apptypes)){
				bh = "TAJG-KD-"+ DateUtil.getCurrYear() +"-"+ cuurBh;
			}else if("CgsqApply".equals(apptypes)){
				bh = "TAJG-CG-"+ DateUtil.getCurrYear() +"-"+ cuurBh;
			}
			t_news.setLevel3name(bh);
			/**
			 * 2021-10-15 modify  by davexin, reason:由于用creater中文用户名，会有同名的操作员，造成更新年假对应人员错误，改用publisher字段来查询对应使用年假人员；
			 * publisher ： save时保存用userid， userid要保证不能重复；
			 */
			//user.setUsername(news.getCreater()); //存储的是中文姓名,流程发起者;
			t_news.setPublisher(request.getSession().getAttribute("userid").toString()); //设置创建人的 userid；
		}
		if(t_newsService.save(t_news)>0){
	        vo.setResult("success");
	        vo.setJieguo(true);
		}
		return vo;
	}

	/**
	 * 2、2、新增保存  T_news信息并且返回成功或者失败信息json格式结果如：result:[success/error]
	 * @param t_news
	 * @param request
	 * @param response
	 * @param file1
	 * @param file2
	 * @param file3
	 * @param file4
	 * @param file5
	 * @return
	 */
	@RequestMapping("/saveT_newsWhitFiles")
	@ResponseBody
	public JsonVO saveT_newsWhitFiles(T_news t_news, HttpServletRequest request,HttpServletResponse response,  MultipartFile file1,  MultipartFile file2,  MultipartFile file3,  MultipartFile file4,MultipartFile file5 ){
		JsonVO vo = new JsonVO();
		vo.setResult("error");
		vo.setJieguo(false);

		//*************************上传相关开始********************************************
		//主图片----判断file数组不能为空并且长度大于0
		if(file1!=null){
			log.info("------本次上传文件ext7FileName1="+file1.getOriginalFilename());
			//保存文件
			String imagepathFileName = saveFile(request, file1);
			t_news.setImagepath(imagepathFileName);
		}

		//详情图片----判断file数组不能为空并且长度大于0
		if(file2!=null){
			log.info("------本次上传文件imagepathFileName2="+file2.getOriginalFilename());
			//保存文件
			String imagepathFileName = saveFile(request, file2);
			t_news.setExt2(imagepathFileName);
		}
		if(file3!=null){
			log.info("------本次上传文件imagepathFileName3="+file3.getOriginalFilename());
			//保存文件
			String imagepathFileName = saveFile(request, file3);
			t_news.setExt3(imagepathFileName);
		}
		if(file4!=null){
			log.info("------本次上传文件imagepathFileName4="+file4.getOriginalFilename());
			//保存文件
			String imagepathFileName = saveFile(request, file4);
			t_news.setExt4(imagepathFileName);
		}
		if(file5!=null){
			log.info("------本次上传文件imagepathFileName5="+file5.getOriginalFilename());
			//保存文件
			String imagepathFileName = saveFile(request, file5);
			t_news.setExt5(imagepathFileName);
		}

		//*************************上传相关结束********************************************
		//如果有特殊需求，需要将json对象值转成java实体对象属性值
		if(t_newsService.save(t_news)>0){
			vo.setResult("success");
			vo.setJieguo(true);
		}
		return vo;
	}

	/***
	 * 保存文件
	 *  String getContentType()//获取文件MIME类型
	 *  InputStream getInputStream()//后去文件流
	 *  String getName() //获取表单中文件组件的名字
	 *  String getOriginalFilename() //获取上传文件的原名
	 *  long getSize() //获取文件的字节大小，单位byte
	 *  boolean isEmpty() //是否为空
	 *  void transferTo(File dest) //保存到一个目标文件中。
	 * @param file
	 * @type z:主图图片， x:详情图片；
	 * @return
	 */
	private String saveFile(HttpServletRequest request, MultipartFile file) {
		// 判断文件是否为空
		if (!file.isEmpty()) {
			try {
				String oldFileName = file.getOriginalFilename();
				//log.error("------fileName="+file.getName());

				String newFileNameSuf = oldFileName.substring(oldFileName.lastIndexOf(".")).toLowerCase();
				//新的文件名：yyyyMMddHHmmss 格式；,把循环位置加上，防止程序执行过快，出现同名的文件名。
				String newFileName = com.common.utils.DateUtil.getCurrDateTime() + newFileNameSuf;
				// 文件保存路径
				String filePath = request.getSession().getServletContext().getRealPath("/") + "upload/"+ newFileName;
				log.info("------file="+filePath+";oldFileName="+oldFileName+";newFileName="+newFileName);
				//如果文件名称中涵：.exe;.bat等可执行文件，提示失败；
				if(true){

				}
				//如果文件大于5000M,不保存该文件
				if(file.getSize()<1024*1024*5000){
					// 转存文件
					file.transferTo(new File(filePath));
					return "upload/"+newFileName;
				}
				log.debug("------文件："+filePath+" 大于5000M,不保存，请上传小于5000M的文件！");
				return "";
			} catch (Exception e) {
				e.printStackTrace();
				log.error(e);
			}
		}
		return "";
	}

	/**
	 * 3。1、修改T_news信息并且返回成功或者失败信息json格式结果如：result:[success/error]
	 * @param t_news
	 * @param request
	 * @return JsonVO
	 */
	@RequestMapping("/updateT_news")
	@ResponseBody
	public JsonVO updateT_news(T_news t_news, HttpServletRequest request){
		JsonVO vo = new JsonVO();
		vo.setResult("error");
		vo.setJieguo(false);
		//如果有特殊值需要处理，在此处手工转换
		//T_news t_newsTemp = t_newsService.findById(t_news);
		//t_newsTemp.setXXX(t_news.getXXX());
		//if(t_newsService.update(t_newsTemp)){

		if(t_newsService.update(t_news)>0){
	        vo.setResult("success");
	        vo.setJieguo(true);
		}
		return vo;
	}

	/**
	 * 设置预警信息为 已处理 状态；
	 * @param id
	 * @param status
	 * @param request
	 * @return
	 */
	@RequestMapping("/setT_newsStatus")
	@ResponseBody
	public JsonVO setT_newsStatus(Integer id, String status, HttpServletRequest request){
		JsonVO vo = new JsonVO();
		vo.setResult("error");
		vo.setJieguo(false);
		T_news t_news = new T_news();
		t_news.setId(id);
		t_news = t_newsService.findById(t_news);
		t_news.setStatus(status);

		if(t_newsService.update(t_news)>0){
			vo.setResult("success");
			vo.setJieguo(true);
		}
		return vo;
	}

	@RequestMapping("/delT_newsAllFile")
	@ResponseBody
	public JsonVO delT_newsAllFile(Integer id,HttpServletRequest request,HttpServletResponse response){
		JsonVO vo = new JsonVO();
		vo.setResult("error");
		vo.setJieguo(false);
		T_news t_news = new T_news();
		t_news.setId(id);
		t_news = t_newsService.findById(t_news);
		t_news.setImagepath("");
		t_news.setExt9("");
		//t_news.setAttach("");

		if(t_newsService.update(t_news)>0){
			vo.setResult("success");
			vo.setJieguo(true);
		}
		return vo;
	}

	/**
     * 3。2、提交审核业务数据
     * 修改T_news信息并且返回成功或者失败信息json格式结果如：result:[success/error]
     * @param t_news
     * @param request
     * @return JsonVO
     */
    @RequestMapping("/tjshT_news")
    @ResponseBody
    public JsonVO tjshT_company(T_news t_news, HttpServletRequest request) throws Exception {
		JsonVO vo = new JsonVO();
		vo.setResult("error");
		vo.setJieguo(false);
		int taskid = getTaskIdByBiztype(t_news.getTypes());
		if(taskid==-1){ //说明没有配置对应流程，-1是没有根据关键字找到流程；
			log.error("------启动流程失败------");
			vo.setInfo("自动流程失败，请联系管理员配置:"+t_news.getTypes()+"对应流程！");
			return vo;
		}
    	//启动工作流； 请假流程；
		return startMyTask( taskid, t_news.getTypes(), t_news.getId(), request);
		//return startMyTask( getTaskIdByBiztype(t_news.getBiztype()),t_news.getBiztype(), t_news.getId(), request);
    }

    /**
     * 3.3、提交T_news审核通过，并且返回成功或者失败信息json格式结果如：result:[success/error]
     * @param t_task_node_instance
     * @param request
     * @return JsonVO
     */
    @RequestMapping("/shtgT_news")
    @ResponseBody
    public JsonVO shtgT_news(T_task_node_instance t_task_node_instance, HttpServletRequest request) {
        return doMyAgree(t_task_node_instance.getTninstanceid(), t_task_node_instance.getNote(), request);
    }

	/**
	 * 流程审核通过时，更新已使用年假天数
	 * @param t_task_node_instance
	 * @param request
	 * @return
	 */
	@RequestMapping("/shtgT_newsHolidy")
	@ResponseBody
	public JsonVO shtgT_newsHolidy(T_task_node_instance t_task_node_instance, HttpServletRequest request) {
		JsonVO vo = doMyAgree(t_task_node_instance.getTninstanceid(), t_task_node_instance.getNote(), request);
		T_task_instance task_instance = new T_task_instance();
		task_instance.setInstanceid(t_task_node_instance.getInstanceid());
		task_instance = t_task_instanceService.findById(task_instance);
		//流程审核通过并且结束；
		if("1".equals(task_instance.getInstancestatus())){
			// 则更新业务；更新请假申请中年假的 已使用天数；
			//获取申请中你年假小时数；
			T_news news = new T_news();
			news.setId(t_task_node_instance.getAppid());
			news = t_newsService.findById(news);
			//如果是请的年假，需要更新：已使用年假总天数；
			if("年假".equals(news.getExt1())){
				//获取用户年假对象，进行更新;
				T_user user = new T_user();
				//user.setId((Integer)request.getSession().getAttribute("id"));
				user.setStartNo(0);
				user.setEndNo(100);
				user.setPageSize(100);
				/**
				 * 2021-10-15 modify  by davexin, reason:由于用creater中文用户名，会有同名的操作员，造成更新年假对应人员错误，改用publisher字段来查询对应使用年假人员；
				 * publisher ： save时保存用userid， userid要保证不能重复；
				 */
				//user.setUsername(news.getCreater()); //存储的是中文姓名,流程发起者;
				user.setUserid(news.getPublisher());

				List userlist = t_userService.findAll(user);
				if( null!=userlist && userlist.size()>0 ){
					//已使用小时数 = 已使用小时数 + 本期申请年假小时数；
					user = (T_user) userlist.get(0);
					String cuur_synjxss = user.getDeptid(); //如果没有维护，默认值为空；
					if(cuur_synjxss==null || cuur_synjxss.equals("") ){
						cuur_synjxss = "0";
					}
					Integer nijianNum = new Integer(cuur_synjxss) + new Integer(news.getExt7());
					user.setDeptid(nijianNum.toString()); //更新年假已使用天数；
					t_userService.update(user);
				}else{
					log.error("------请年假申请对应人员：("+news.getPublisher()+")在系统中没有找到，更新申请人年假天数失败！------");
					vo.setResult("error");
					vo.setJieguo(false);
					vo.setInfo("请年假申请对应人员：("+news.getPublisher()+")在系统中没有找到，更新申请人年假天数失败！");
				}
			}
		}

		return vo;
    }

    /**
     * 3.4、提交T_news审核退回，信息并且返回成功或者失败信息json格式结果如：result:[success/error]
     * @param t_task_node_instance
     * @param request
     * @return JsonVO
     */
    @RequestMapping("/shthT_news")
    @ResponseBody
    public JsonVO shthT_news(T_task_node_instance t_task_node_instance, HttpServletRequest request) {
        return doMyBack(t_task_node_instance.getTninstanceid(), t_task_node_instance.getNote(), request);
    }

	/**
	 * 3.5、提交T_news审核退回至发起人，信息并且返回成功或者失败信息json格式结果如：result:[success/error]
	 * @param t_task_node_instance
	 * @param request
	 * @return JsonVO
	 */
	@RequestMapping("/shthzfqrT_news")
	@ResponseBody
	public JsonVO shthzfqrT_news(T_task_node_instance t_task_node_instance, HttpServletRequest request) {
		return doMyBackToCreater(t_task_node_instance.getTninstanceid(), t_task_node_instance.getNote(), request);
	}

	/**
	 * 4、根据id查询T_news单个信息并显示在修改页面
	 * @param id
	 * @param request
	 * @return T_news json格式字符串
	 */
	@RequestMapping("/getT_news")
	@ResponseBody
	public T_news getT_news(Integer id,HttpServletRequest request){
		T_news t_news = new T_news();
		t_news.setId(id);
		return t_newsService.findById(t_news);
	}

	/**
	 * 5、删除T_news根据id
	 * @param id
	 * @param request
	 * @param response
	 * return JsonVO ：json格式字符串
	 */
	@RequestMapping("/delT_news")
	@ResponseBody
	public JsonVO delT_news(Integer id,HttpServletRequest request,HttpServletResponse response){
        JsonVO vo = new JsonVO();
		vo.setResult("error");
		vo.setJieguo(false);

		T_news t_news = new T_news();
		t_news.setId(id);

		if(t_newsService.delete(t_news)>0){
			vo.setResult("success");
	        vo.setJieguo(true);
		}
		return vo;
	}

	/**
	 * 6、1、跳转到t_news/toT_newsList查询所有数据页面
	 *  return /WEB-INF/views/business/t_news/t_newsList.jsp
	 */
    @RequestMapping(value = "/toT_newsList")
    public String toT_newsList() {
    	log.debug("------跳转到/WEB-INF/views/business/t_news/t_newsList.jsp------");
        return "business/t_news/t_newsList";
    }

	/**
	 * 6、2、跳转到t_news/toT_newsList查询所有数据页面
	 *  return /WEB-INF/views/business/t_news/t_newsList.jsp
	 */
	@RequestMapping(value = "/toT_newsCurdGonggao")
	public String toT_newsCurdGonggao() {
		log.debug("------跳转到/WEB-INF/views/business/t_news/t_newsCurdGonggao.jsp------");
		return "business/t_news/t_newsCurdGonggao";
	}
	/**
	 * 6、3、跳转到t_news/toT_newsList查询所有数据页面
	 *  return /WEB-INF/views/business/t_news/t_newsList.jsp
	 */
	@RequestMapping(value = "/toT_newsListGonggao")
	public String toT_newsListGonggao() {
		log.debug("------跳转到/WEB-INF/views/business/t_news/t_newsListGonggao.jsp------");
		return "business/t_news/t_newsListGonggao";
	}

	@RequestMapping(value = "/toT_newsListHoliday")
	public String toT_newsListHoliday() {
		log.debug("------跳转到/WEB-INF/views/business/t_news/t_newsListHoliday.jsp------");
		return "business/t_news/t_newsListHoliday";
	}

	@RequestMapping(value = "/toT_newsListHolidayCount")
	public String toT_newsListHolidayCount() {
		log.debug("------跳转到/WEB-INF/views/business/t_news/t_newsListHolidayCount.jsp------");
		return "business/t_news/t_newsListHolidayCount";
	}

	/**
	 * 6、4、跳转到t_news/toT_newsList查询所有数据页面
	 *  return /WEB-INF/views/business/t_news/t_newsList.jsp
	 */
	@RequestMapping(value = "/toT_newsCurdDangan")
	public String toT_newsCurdDangan() {
		log.debug("------跳转到/WEB-INF/views/business/t_news/t_newsCurdDangan.jsp------");
		return "business/t_news/t_newsCurdDangan";
	}
	/**
	 * 6、5、跳转到t_news/toT_newsList查询所有数据页面
	 *  return /WEB-INF/views/business/t_news/t_newsList.jsp
	 */
	@RequestMapping(value = "/toT_newsListDangan")
	public String toT_newsListDangan() {
		log.debug("------跳转到/WEB-INF/views/business/t_news/t_newsListDangan.jsp------");
		return "business/t_news/t_newsListDangan";
	}

	/**
	 * 6、52、跳转到t_news/toT_newsList查询所有数据页面
	 *  return /WEB-INF/views/business/t_news/t_newsList.jsp
	 */
	@RequestMapping(value = "/toT_newsListDanganjieyue")
	public String toT_newsListDanganjieyue() {
		log.debug("------跳转到/WEB-INF/views/business/t_news/t_newsListDanganjieyue.jsp------");
		return "business/t_news/t_newsListDanganjieyue";
	}

	@RequestMapping(value = "/toT_newsCurdDanganjieyue")
	public String toT_newsCurdDanganjieyue() {
		log.debug("------跳转到/WEB-INF/views/business/t_news/t_newsCurdDanganjieyue.jsp------");
		return "business/t_news/t_newsCurdDanganjieyue";
	}

	@RequestMapping(value = "/toT_newsCurdDanganguihuan")
	public String toT_newsCurdDanganguihuan() {
		log.debug("------跳转到/WEB-INF/views/business/t_news/t_newsCurdDanganguihuan.jsp------");
		return "business/t_news/t_newsCurdDanganguihuan";
	}

	/**
	 * 6、6、跳转到t_news/toT_newsList查询所有数据页面
	 *  return /WEB-INF/views/business/t_news/t_newsList.jsp
	 */
	@RequestMapping(value = "/toT_newsAllApply")
	public String toT_newsAllApply() {
		log.debug("------跳转到/WEB-INF/views/business/t_news/t_newsAllApply.jsp------");
		return "business/t_news/t_newsAllApply";
	}

	/**
	 * 6.7、跳转到t_news/toT_newsListAll查询所有数据页面
	 *  return /WEB-INF/views/business/t_news/t_newsList.jsp
	 */
	@RequestMapping(value = "/toT_newsListAll")
	public String toT_newsListAll() {
		log.debug("------跳转到/WEB-INF/views/business/t_news/toT_newsListAll.jsp------");
		return "business/t_news/t_newsListAll";
	}

	/**
	 * 6.8、跳转到t_news/toT_newsContract 查询所有数据页面
	 *  return /WEB-INF/views/business/t_news/t_newsContract.jsp
	 */
	@RequestMapping(value = "/toT_newsContract")
	public String toT_newsContract() {
		log.debug("------跳转到/WEB-INF/views/business/t_news/t_newsContract.jsp------");
		return "business/t_news/t_newsContract";
	}
	@RequestMapping(value = "/toT_newsContractSH")
	public String toT_newsContractSH() {
		log.debug("------跳转到/WEB-INF/views/business/t_news/t_newsContractSH.jsp------");
		return "business/t_news/t_newsContractSH";
	}
	/**
	 * 7、新增、修改、详情页面t_news/toT_newsCurd跳转
     * business/t_news/T_newsCurd.jsp
	 */
    @RequestMapping(value = "/toT_newsMoney")
    public String toT_newsMoney() {
    	log.debug("------跳转到/WEB-INF/views/business/t_news/t_newsMoney.jsp------");
        return "business/t_news/t_newsMoney";
    }
	@RequestMapping(value = "/toT_newsMoneySH")
	public String toT_newsMoneySH() {
		log.debug("------跳转到/WEB-INF/views/business/t_news/t_newsMoneySH.jsp------");
		return "business/t_news/t_newsMoneySH";
	}
	/**
	 * 7、新增、修改、详情页面t_news/toT_newsCurd跳转
	 * business/t_news/T_newsCurd.jsp
	 */
	@RequestMapping(value = "/toT_newsPay")
	public String toT_newsPay() {
		log.debug("------跳转到/WEB-INF/views/business/t_news/t_newsPay.jsp------");
		return "business/t_news/t_newsPay";
	}
	@RequestMapping(value = "/toT_newsPaySH")
	public String toT_newsPaySH() {
		log.debug("------跳转到/WEB-INF/views/business/t_news/t_newsPaySH.jsp------");
		return "business/t_news/t_newsPaySH";
	}

	/**
	 * 7、新增、修改、详情页面t_news/toT_newsCurd跳转
	 * business/t_news/T_newsCurd.jsp
	 */
	@RequestMapping(value = "/toT_newsYongyin")
	public String toT_newsYongyin() {
		log.debug("------跳转到/WEB-INF/views/business/t_news/t_newsYongyin.jsp------");
		return "business/t_news/t_newsYongyin";
	}
	@RequestMapping(value = "/toT_newsYongyinSH")
	public String toT_newsYongyinSH() {
		log.debug("------跳转到/WEB-INF/views/business/t_news/t_newsYongyinSH.jsp------");
		return "business/t_news/t_newsYongyinSH";
	}

	/**
	 * 7、新增、修改、详情页面t_news/toT_newsCurd跳转
	 * business/t_news/T_newsCurd.jsp
	 */
	@RequestMapping(value = "/toT_newsFawen")
	public String toT_newsFawen() {
		log.debug("------跳转到/WEB-INF/views/business/t_news/t_newsFawen.jsp------");
		return "business/t_news/t_newsFawen";
	}
	@RequestMapping(value = "/toT_newsFawenSH")
	public String toT_newsFawenSH() {
		log.debug("------跳转到/WEB-INF/views/business/t_news/t_newsFawenSH.jsp------");
		return "business/t_news/t_newsFawenSH";
	}
	/**
	 * 7、新增、修改、详情页面t_news/toT_newsCurd跳转
	 * business/t_news/T_newsCurd.jsp
	 */
	@RequestMapping(value = "/toT_newsDangan")
	public String toT_newsDangan() {
		log.debug("------跳转到/WEB-INF/views/business/t_news/t_newsDangan.jsp------");
		return "business/t_news/t_newsDangan";
	}
	/**
	 * 7、新增、修改、详情页面t_news/toT_newsCurd跳转
	 * business/t_news/T_newsCurd.jsp
	 */
	@RequestMapping(value = "/toT_newsListGongdan")
	public String toT_newsListGongdan() {
		log.debug("------跳转到/WEB-INF/views/business/t_news/t_newsListGongdan.jsp------");
		return "business/t_news/t_newsListGongdan";
	}

	@RequestMapping(value = "/toT_newsListWarn")
	public String toT_newsListWarn() {
		log.debug("------跳转到/WEB-INF/views/business/t_news/t_newsListWarn.jsp------");
		return "business/t_news/t_newsListWarn";
	}

	@RequestMapping(value = "/toT_newsListRenwu")
	public String toT_newsListRenwu() {
		log.debug("------跳转到/WEB-INF/views/business/t_news/t_newsListRenwu.jsp------");
		return "business/t_news/t_newsListRenwu";
	}
	@RequestMapping(value = "/toT_newsCurdRenwu")
	public String toT_newsCurdRenwu() {
		log.debug("------跳转到/WEB-INF/views/business/t_news/t_newsCurdRenwu.jsp------");
		return "business/t_news/t_newsCurdRenwu";
	}
	/**
	 * 7、新增、修改、详情页面t_news/toT_newsCurd跳转
	 * business/t_news/T_newsCurd.jsp
	 */
	@RequestMapping(value = "/toT_newsCurdGongdan")
	public String toT_newsCurdGongdan() {
		log.debug("------跳转到/WEB-INF/views/business/t_news/t_newsCurdGongdan.jsp------");
		return "business/t_news/t_newsCurdGongdan";
	}
	/**
	 * 7、新增、修改、详情页面t_news/toT_newsCurd跳转
	 * business/t_news/T_newsCurd.jsp
	 */
	@RequestMapping(value = "/toT_newsListKefu")
	public String toT_newsListKefu() {
		log.debug("------跳转到/WEB-INF/views/business/t_news/t_newsListKefu.jsp------");
		return "business/t_news/t_newsListKefu";
	}
	/**
	 * 7、新增、修改、详情页面t_news/toT_newsCurd跳转
	 * business/t_news/T_newsCurd.jsp
	 */
	@RequestMapping(value = "/toT_newsCurdKefu")
	public String toT_newsCurdKefu() {
		log.debug("------跳转到/WEB-INF/views/business/t_news/t_newsCurdKefu.jsp------");
		return "business/t_news/t_newsCurdKefu";
	}

	@RequestMapping(value = "/toT_newsCurdLunBo")
	public String toT_newsCurdLunBo() {
		log.debug("------跳转到/WEB-INF/views/business/t_news/t_newsCurdLunBo.jsp------");
		return "business/t_news/t_newsCurdLunBo";
	}
	@RequestMapping(value = "/toT_newsListLunBo")
	public String toT_newsListLunBo() {
		log.debug("------跳转到/WEB-INF/views/business/t_news/t_newsListLunBo.jsp------");
		return "business/t_news/t_newsListLunBo";
	}

	/**
	 * 7、新增、修改、详情页面t_news/toT_newsCurd跳转
	 * business/t_news/T_newsCurd.jsp
	 */
	@RequestMapping(value = "/toT_newsListManyidu")
	public String toT_newsListManyidu() {
		log.debug("------跳转到/WEB-INF/views/business/t_news/t_newsListManyidu.jsp------");
		return "business/t_news/t_newsListManyidu";
	}
	/**
	 * 7、新增、修改、详情页面t_news/toT_newsCurd跳转
	 * business/t_news/T_newsCurd.jsp
	 */
	@RequestMapping(value = "/toT_newsCurdManyidu")
	public String toT_newsCurdManyidu() {
		log.debug("------跳转到/WEB-INF/views/business/t_news/t_newsCurdManyidu.jsp------");
		return "business/t_news/t_newsCurdManyidu";
	}

	/**
	 * 7、新增、修改、详情页面t_news/toT_newsCurd跳转
	 * business/t_news/T_newsCurd.jsp
	 */
	@RequestMapping(value = "/toT_newsListHuifang")
	public String toT_newsListHuifang() {
		log.debug("------跳转到/WEB-INF/views/business/t_news/t_newsListHuifang.jsp------");
		return "business/t_news/t_newsListHuifang";
	}
	/**
	 * 7、新增、修改、详情页面t_news/toT_newsCurd 跳转
	 * business/t_news/T_newsCurd.jsp
	 */
	@RequestMapping(value = "/toT_newsCurdHuifang")
	public String toT_newsCurdHuifang() {
		log.debug("------跳转到/WEB-INF/views/business/t_news/t_newsCurdHuifang.jsp------");
		return "business/t_news/t_newsCurdHuifang";
	}

	/**
	 * 7、新增、修改、详情页面t_news/toT_newsCurd跳转
	 * business/t_news/T_newsCurd.jsp
	 */
	@RequestMapping(value = "/toT_newsListMingpian")
	public String toT_newsListMingpian() {
		log.debug("------跳转到/WEB-INF/views/business/t_news/t_newsListMingpian.jsp------");
		return "business/t_news/t_newsListMingpian";
	}
	/**
	 * 7、新增、修改、详情页面t_news/toT_newsCurd 跳转
	 * business/t_news/T_newsCurd.jsp
	 */
	@RequestMapping(value = "/toT_newsCurdMingpian")
	public String toT_newsCurdMingpian() {
		log.debug("------跳转到/WEB-INF/views/business/t_news/t_newsCurdMingpian.jsp------");
		return "business/t_news/t_newsCurdMingpian";
	}

	/**
	 * 7、新增、修改、详情页面t_news/toT_newsCurd跳转
	 * business/t_news/T_newsCurd.jsp
	 */
	@RequestMapping(value = "/toT_newsReceive")
	public String toT_newsRevice() {
		log.debug("------跳转到/WEB-INF/views/business/t_news/t_newsReceive.jsp------");
		return "business/t_news/t_newsReceive";
	}
	@RequestMapping(value = "/toT_newsReceiveSH")
	public String toT_newsReceiveSH() {
		log.debug("------跳转到/WEB-INF/views/business/t_news/t_newsReceiveSH.jsp------");
		return "business/t_news/t_newsReceiveSH";
	}

    /**
     * 7、新增、修改、详情页面t_news/toT_newsCurd跳转
     * business/t_news/T_newsCurd.jsp
     */
    @RequestMapping(value = "/toT_newsCgsq")
    public String toT_newsCgsq() {
        log.debug("------跳转到/WEB-INF/views/business/t_news/t_newsCgsq.jsp------");
        return "business/t_news/t_newsCgsq";
    }
    @RequestMapping(value = "/toT_newsCgsqSH")
    public String toT_newsCgsqSH() {
        log.debug("------跳转到/WEB-INF/views/business/t_news/t_newsCgsqSH.jsp------");
        return "business/t_news/t_newsCgsqSH";
    }

	/**
	 * 7、新增、修改、详情页面t_news/toT_newsCurd跳转
	 * business/t_news/T_newsCurd.jsp
	 */
	@RequestMapping(value = "/toT_newsGet")
	public String toT_newsGet() {
		log.debug("------跳转到/WEB-INF/views/business/t_news/t_newsGet.jsp------");
		return "business/t_news/t_newsGet";
	}
	@RequestMapping(value = "/toT_newsGetSH")
	public String toT_newsGetSH() {
		log.debug("------跳转到/WEB-INF/views/business/t_news/t_newsGetSH.jsp------");
		return "business/t_news/t_newsGetSH";
	}

	/**
	 * 7、新增、修改、详情页面t_news/toT_newsCurd跳转
	 * business/t_news/T_newsCurd.jsp
	 */
	@RequestMapping(value = "/toT_newsCar")
	public String toT_newsCar() {
		log.debug("------跳转到/WEB-INF/views/business/t_news/t_newsCar.jsp------");
		return "business/t_news/t_newsCar";
	}
	@RequestMapping(value = "/toT_newsCarSH")
	public String toT_newsCarSH() {
		log.debug("------跳转到/WEB-INF/views/business/t_news/t_newsCarSH.jsp------");
		return "business/t_news/t_newsCarSH";
	}

	/**
	 * 7、新增、修改、详情页面t_news/toT_newsCurd跳转
	 * business/t_news/T_newsCurd.jsp
	 */
	@RequestMapping(value = "/toT_newsHolidy")
	public String toT_newsHolidy() {
		log.debug("------跳转到/WEB-INF/views/business/t_news/t_newsHolidy.jsp------");
		return "business/t_news/t_newsHolidy";
	}
	@RequestMapping(value = "/toT_newsHolidySH")
	public String toT_newsHolidySH() {
		log.debug("------跳转到/WEB-INF/views/business/t_news/t_newsHolidySH.jsp------");
		return "business/t_news/t_newsHolidySH";
	}
	/**
	 * 7、新增、修改、详情页面t_news/toT_newsCurd跳转
	 * business/t_news/T_newsCurd.jsp
	 */
	@RequestMapping(value = "/toT_newsOut")
	public String toT_newsOut() {
		log.debug("------跳转到/WEB-INF/views/business/t_news/t_newsOut.jsp------");
		return "business/t_news/t_newsOut";
	}
	@RequestMapping(value = "/toT_newsOutSH")
	public String toT_newsOutSH() {
		log.debug("------跳转到/WEB-INF/views/business/t_news/t_newsOutSH.jsp------");
		return "business/t_news/t_newsOutSH";
	}

	/**
	 * 7、新增、修改、详情页面t_news/toT_newsCurd跳转
	 * business/t_news/T_newsCurd.jsp
	 */
	@RequestMapping(value = "/toT_newsTrival")
	public String toT_newsTrival() {
		log.debug("------跳转到/WEB-INF/views/business/t_news/t_newsTrival.jsp------");
		return "business/t_news/t_newsTrival";
	}
	@RequestMapping(value = "/toT_newsTrivalSH")
	public String toT_newsTrivalSH() {
		log.debug("------跳转到/WEB-INF/views/business/t_news/t_newsTrivalSH.jsp------");
		return "business/t_news/t_newsTrivalSH";
	}

	/**
	 * 7、新增、修改、详情页面t_news/toT_newsCurd跳转
	 * business/t_news/T_newsCurd.jsp
	 */
	@RequestMapping(value = "/toT_newsAddjob")
	public String toT_newsAddjob() {
		log.debug("------跳转到/WEB-INF/views/business/t_news/t_newsAddjob.jsp------");
		return "business/t_news/t_newsAddjob";
	}
	@RequestMapping(value = "/toT_newsAddjobSH")
	public String toT_newsAddjobSH() {
		log.debug("------跳转到/WEB-INF/views/business/t_news/t_newsAddjobSH.jsp------");
		return "business/t_news/t_newsAddjobSH";
	}

	/**
	 * 7、新增、修改、详情页面t_news/toT_newsCurd跳转
	 * business/t_news/T_newsCurd.jsp
	 */
	@RequestMapping(value = "/toT_newsAddcard")
	public String toT_newsAddcard() {
		log.debug("------跳转到/WEB-INF/views/business/t_news/t_newsAddcard.jsp------");
		return "business/t_news/t_newsAddcard";
	}
	@RequestMapping(value = "/toT_newsAddcardSH")
	public String toT_newsAddcardSH() {
		log.debug("------跳转到/WEB-INF/views/business/t_news/t_newsAddcardSH.jsp------");
		return "business/t_news/t_newsAddcardSH";
	}

	/**
	 * 7、新增、修改、详情页面t_news/toT_newsCurd跳转
	 * business/t_news/T_newsCurd.jsp
	 */
	@RequestMapping(value = "/toT_newsListKuaidi")
	public String toT_newsListKuaidi() {
		log.debug("------跳转到/WEB-INF/views/business/t_news/t_newsListKuaidi.jsp------");
		return "business/t_news/t_newsListKuaidi";
	}
	@RequestMapping(value = "/toT_newsListAddjob")
	public String toT_newsListAddjob() {
		log.debug("------跳转到/WEB-INF/views/business/t_news/t_newsListAddjob.jsp------");
		return "business/t_news/t_newsListAddjob";
	}
	@RequestMapping(value = "/toT_newsListGet")
	public String toT_newsListGet() {
		log.debug("------跳转到/WEB-INF/views/business/t_news/t_newsListGet.jsp------");
		return "business/t_news/t_newsListGet";
	}
	@RequestMapping(value = "/toT_newsListReceive")
	public String toT_newsListReceive() {
		log.debug("------跳转到/WEB-INF/views/business/t_news/t_newsListReceive.jsp------");
		return "business/t_news/t_newsListReceive";
	}
	@RequestMapping(value = "/toT_newsListKaoqin")
	public String toT_newsListKaoqin() {
		log.debug("------跳转到/WEB-INF/views/business/t_news/t_newsListKaoqin.jsp------");
		return "business/t_news/t_newsListKaoqin";
	}
	@RequestMapping(value = "/toT_newsCurdKaoqin")
	public String toT_newsCurdKaoqin() {
		log.debug("------跳转到/WEB-INF/views/business/t_news/t__newsCurdKaoqin.jsp------");
		return "business/t_news/t__newsCurdKaoqin";
	}

	@RequestMapping(value = "/toT_newsListManager")
	public String toT_newsListManager() {
		log.debug("------跳转到/WEB-INF/views/business/t_news/t_newsListManager.jsp------");
		return "business/t_news/t_newsListManager";
	}

	/**
	 * 6、4、跳转到t_news/toT_newsList查询所有数据页面
	 *  return /WEB-INF/views/business/t_news/t_newsList.jsp
	 */
	@RequestMapping(value = "/toT_newsCurdKuaidi")
	public String toT_newsCurdKuaidi() {
		log.debug("------跳转到/WEB-INF/views/business/t_news/t_newsCurdKuaidi.jsp------");
		return "business/t_news/t_newsCurdKuaidi";
	}

	@RequestMapping(value = "/toT_newsCurdKuaidi2")
	public String toT_newsCurdKuaidi2() {
		log.debug("------跳转到/WEB-INF/views/business/t_news/t_newsCurdKuaidi2.jsp------");
		return "business/t_news/t_newsCurdKuaidi2";
	}

	@RequestMapping(value = "/toT_newsCurdKuaidiSH")
	public String toT_newsCurdKuaidiSH() {
		log.debug("------跳转到/WEB-INF/views/business/t_news/t_newsCurdKuaidiSH.jsp------");
		return "business/t_news/t_newsCurdKuaidiSH";
	}

	/**
	 * 新增、修改、详情页面t_news/toT_newsCurd跳转
	 * business/t_news/T_newsCurd.jsp
	 */
	@RequestMapping(value = "/toT_newsListMeeting")
	public String toT_newsListMeeting() {
		log.debug("------跳转到/WEB-INF/views/business/t_news/t_newsListMeeting.jsp------");
		return "business/t_news/t_newsListMeeting";
	}


	/**
	 * 新增、修改、详情页面t_news/toT_newsCurd跳转
	 * business/t_news/T_newsCurd.jsp
	 */
	@RequestMapping(value = "/toT_newsListMeetingManager")
	public String toT_newsListMeetingManager() {
		log.debug("------跳转到/WEB-INF/views/business/t_news/t_newsListMeetingManager.jsp------");
		return "business/t_news/t_newsListMeetingManager";
	}

	/**
	 * 跳转到t_news/toT_newsList查询所有数据页面
	 *  return /WEB-INF/views/business/t_news/t_newsList.jsp
	 */
	@RequestMapping(value = "/toT_newsCurdMeeting")
	public String toT_newsCurdMeeting() {
		log.debug("------跳转到/WEB-INF/views/business/t_news/t_newsCurdMeeting.jsp------");
		return "business/t_news/t_newsCurdMeeting";
	}

	/**
	 * 新增、修改、详情页面t_news/toT_newsCurd跳转
	 * business/t_news/T_newsCurd.jsp
	 */
	@RequestMapping(value = "/toT_newsListRicheng")
	public String toT_newsListRicheng() {
		log.debug("------跳转到/WEB-INF/views/business/t_news/t_newsListRicheng.jsp------");
		return "business/t_news/t_newsListRicheng";
	}
	/**
	 * 跳转到t_news/toT_newsList查询所有数据页面
	 *  return /WEB-INF/views/business/t_news/t_newsList.jsp
	 */
	@RequestMapping(value = "/toT_newsCurdRicheng")
	public String toT_newsCurdRicheng() {
		log.debug("------跳转到/WEB-INF/views/business/t_news/t_newsCurdRicheng.jsp------");
		return "business/t_news/t_newsCurdRicheng";
	}

	@RequestMapping(value = "/toT_newsListZhaopin")
	public String toT_newsListZhaopin() {
		log.debug("------跳转到/WEB-INF/views/business/t_news/t_newsListZhaopin.jsp------");
		return "business/t_news/t_newsListZhaopin";
	}

	@RequestMapping(value = "/toT_newsCurdZhaopin")
	public String toT_newsCurdZhaopin() {
		log.debug("------跳转到/WEB-INF/views/business/t_news/t_newsCurdZhaopin.jsp------");
		return "business/t_news/t_newsCurdZhaopin";
	}

	/**
	 * 7、新增、修改、详情页面t_news/toT_newsCurd跳转
	 * business/t_news/T_newsCurd.jsp
	 */
	@RequestMapping(value = "/toShyj")
	public String toShyj() {
		log.debug("------跳转到/WEB-INF/views/business/t_news/shyj.jsp------");
		return "business/t_news/shyj";
	}


    /**
	 * 8、批量删除T_news根据主键id
	 * 是否要实现批量删除，待考虑，基本上用途不大
	 * @param id
	 * @param request
	 * @param response
	@RequestMapping("/delT_newsBatch")
	public String delT_newsBatch(HttpServletRequest request,HttpServletResponse response){
		String[] ids = request.getParameterValues("ids");
		System.out.println("------ids="+ids);
		T_news t_news = new T_news();
		int j=0;
		for(int i =0;i< ids.length;i++){
			j++;
			log.error("------ids[i]="+ids[i]);
			t_news.setId(new Integer(ids[i]).intValue());
			t_newsService.delete(t_news);
		}
		if(j==ids.length){
			log.debug("------t_news批量删除成功！------");
		}else{
			log.error("------t_news批量删除部分成功！部分失败！------");
		}

		return "redirect:/t_news/getAllT_news";
	}
*/



}









